#include<stdio.h>
int main(void)
{
    int year,month,day,b;
    int day_of_year(int year, int month, int day);
    scanf("%d%d%d",&year,&month,&day);
    b=day_of_year(year,month,day);
    printf("Input year, month, day: \nDays of year: %d",b);
    printf("\n");
    return 0;
}
int day_of_year(int year,int month,int day)
{
    int i,j,c=0,sum=0;
    if(year%100!=0&&year%4==0||year%400==0)
        c=1;
    for(i=1; i<month; i++)
    {
        if(i==1||i==3||i==5||i==6||i==7||i==8||i==10||i==12)
            sum+=31;
        else if(i==4||i==6||i==9||i==11)
            sum+=30;
        else if(i==2&&c==1)
            sum+=29;
        else
            sum+=28;
    }
    return sum+day;
}
